package com.victor.common;

import java.util.Arrays;

/** rpc数据通信的请求规则
 * Created by DJJ on 2019/3/11.
 */
public class RpcRequest {
    //请求消息的id
    private String requestId;
    //请求的具体类名(接口名)
    private String className;
    //请求具体的方法名称
    private String methodName;
    //请求的方法参数类型列表
    private Class<?>[] parametersTypes;
    //请求的方法参数列表
    private Object[] parameters;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class<?>[] getParametersTypes() {
        return parametersTypes;
    }

    public void setParametersTypes(Class<?>[] parametersTypes) {
        this.parametersTypes = parametersTypes;
    }

    public Object[] getParameters() {
        return parameters;
    }

    public void setParameters(Object[] parameters) {
        this.parameters = parameters;
    }

    @Override
    public String toString() {
        return "RpcRequest{" +
                "requestId='" + requestId + '\'' +
                ", className='" + className + '\'' +
                ", methodName='" + methodName + '\'' +
                ", parametersTypes=" + Arrays.toString(parametersTypes) +
                ", parameters=" + Arrays.toString(parameters) +
                '}';
    }
}
